/*
* Copyright (c) 2007 by Kirill Kolodyazhniy.
* See the file "license.terms" for information on usage and redistribution.
*/

#ifndef M_RENDERABLE_H
#define M_RENDERABLE_H

#include "common.h"
#include "matrix4.h"
#include "types.h"
#include "refptr.h"

namespace Engine
{
	/**
	*   Abstract class defining the interface all renderable objects must implement.
	*/
	class Renderable
	{
	public:
        virtual ~Renderable() { }

		/**
		*   Retrieves a pointer to the material this renderable object uses.
        */
        virtual const MaterialPtr GetMaterial(void) const = 0;

		/**
		*   Gets the render operation required to send this object to the frame buffer.
        */
		virtual RenderDataPtr GetRenderData() const = 0;

		/**
		*   Gets the world transform matrix / matrices for this renderable object.
        */
        virtual const Matrix4<REAL>& GetWorldTransform() const = 0;

		/**
		*   Returns vertex data.
		*/
		virtual const HardWareBufferPtr GetVertexData() const = 0;

		/**
		*   Returns index data.
		*/
		virtual const HardWareBufferPtr GetIndexData() const = 0;

		/**
		*   Return vertex declaration object.
		*/
		virtual const VertexDeclarationPtr GetVertexDeclaration() const = 0;

	};
}

#endif
